Multi-valued logic